<html>
<head><meta charset="utf-8"><title>can&#x27;t find out return type of .to_string() · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/can&#x27;t.20find.20out.20return.20type.20of.20.2Eto_string().html">can&#x27;t find out return type of .to_string()</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="169215884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/can%27t%20find%20out%20return%20type%20of%20.to_string%28%29/near/169215884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/can&#x27;t.20find.20out.20return.20type.20of.20.2Eto_string().html#169215884">(Jun 28 2019 at 11:17)</a>:</h4>
<p>Hi, was trying out rust analyzer, and found out that when I have <code>let x = String::from("hi");</code> and hover the <code>x</code>;  the type information will say <code>{unknown}</code>, is this a bug?</p>



<a name="169215936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/can%27t%20find%20out%20return%20type%20of%20.to_string%28%29/near/169215936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/can&#x27;t.20find.20out.20return.20type.20of.20.2Eto_string().html#169215936">(Jun 28 2019 at 11:18)</a>:</h4>
<p>I'm using vs code and the ra-lsp extension</p>



<a name="169217288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/can%27t%20find%20out%20return%20type%20of%20.to_string%28%29/near/169217288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/can&#x27;t.20find.20out.20return.20type.20of.20.2Eto_string().html#169217288">(Jun 28 2019 at 11:43)</a>:</h4>
<p><span class="user-mention" data-user-id="217864">@matthiaskrgr</span> that is not <em>currently</em> implemented, but should be added relatively soon, as <a href="https://github.com/rust-analyzer/rust-analyzer/pull/1408" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/pull/1408">https://github.com/rust-analyzer/rust-analyzer/pull/1408</a> added the necessary groundwork for associated types support</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>